package com.demo0;

/**
 * @author zhoujun
 * @date 2025/3/26 23:30
 */
public class NoMediatorPatternDemo {
    public static void main(String[] args) {

        ConcreteColleagueA colleagueA = new ConcreteColleagueA();
        ConcreteColleagueB colleagueB = new ConcreteColleagueB();

        colleagueA.setColleagueB(colleagueB);
        colleagueB.setColleagueB(colleagueA);

        colleagueA.send("你好,我是同事A");
        colleagueB.send("你好,我是同事B");

        //不使用中介者模式,发现这样,会有很严重的耦合
    }
}
